export default {
  // Global page headers: https://go.nuxtjs.dev/config-head
  head: {
    title: 'nuxt-basic',
    htmlAttrs: {
      lang: 'en'
    },
    meta: [
      { charset: 'utf-8' },
      { name: 'viewport', content: 'width=device-width, initial-scale=1' },
      { hid: 'description', name: 'description', content: '' },
      { name: 'format-detection', content: 'telephone=no' }
    ],
    link: [
      { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
    ]
  },

  // Global CSS: https://go.nuxtjs.dev/config-css
  css: [
    '~/static/reset.css',
    'ant-design-vue/dist/antd.css',
  ],
  // https://www.nuxtjs.cn/api/configuration-loading
  // loading: false,
  // loading: {
  //   color: 'blue'
  // },
  loading: '~/components/loading.vue',

  // Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
  plugins: [
    '@/plugins/antd-ui',
    '~/plugins/router.js',
    '~/plugins/axios',
  ],

  // Auto import components: https://go.nuxtjs.dev/config-components
  components: true,

  // Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
  buildModules: [
  ],

  // Modules: https://go.nuxtjs.dev/config-modules
  modules: [
    // '@nuxtjs/router'
    '@nuxtjs/axios',
    'cookie-universal-nuxt'
  ],
  axios: {
    // 是否可以跨域
    proxy: true,
    // retry: { retries: 3 },
    // baseUrl: process.env.NODE_ENV === 'production' ? 'xxx' : 'xxx'
  },
  proxy: {
    '/api': {
      target: 'http://testapi.xuexiluxian.cn/',
      // pathRewrite: {
      //   '^/api': ''
      // }
    }
  },
  // Build Configuration: https://go.nuxtjs.dev/config-build
  build: {
  },
  // router: {
  //   middleware: 'auth'
  // }
}
